Skip to content

docs: use Corepack instead of npm i -g yarn in theme setup#122

Merged
Boy132 merged 2 commits intopelican-dev:mainfrom
snxRCS:patch-1
Apr 30, 2026
Merged

docs: use Corepack instead of npm i -g yarn in theme setup#122
Boy132 merged 2 commits intopelican-dev:mainfrom
snxRCS:patch-1

Conversation

@snxRCS
Copy link
Copy Markdown
Contributor

@snxRCS snxRCS commented Apr 22, 2026

The theme setup snippet in README.md currently installs Yarn via npm i -g yarn, which requires a global npm write and is the legacy way to get Yarn on Node.

Node.js 22 ships with Corepack, the officially supported mechanism for managing package managers (Yarn, pnpm, ...). Enabling Corepack is a single command, avoids the global npm install, and makes the Yarn version pinned per-project (via the packageManager field in a theme's package.json) rather than whatever happens to be globally installed on the host.

Changes

  • ## Additional setup for themes paragraph mentions Corepack instead of a global Yarn install.
  • Replaces npm i -g yarn with sudo corepack enable.

No other changes; the NodeSource install step is untouched.

Summary by CodeRabbit

  • Documentation
    • Updated theme setup to reflect that Yarn can be provided either via direct install or via Node.js Corepack; example commands updated to include enabling Corepack before installing Yarn globally and removed prior requirement to have Yarn preinstalled.

Updated instructions for theme setup to include enabling Corepack.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 75649a97-cf26-4f43-aaae-e97fa3490018

📥 Commits

Reviewing files that changed from the base of the PR and between ef5c4a4 and 90b214d.

📒 Files selected for processing (1)
  • README.md

📝 Walkthrough

Walkthrough

README updated: the "themes" setup now recommends enabling Node.js Corepack (sudo corepack enable) before installing Yarn, and removes the prior requirement that Yarn be pre-installed.

Changes

Cohort / File(s) Summary
Documentation Update
README.md
Replaced explicit global Yarn install instruction with Corepack enablement (sudo corepack enable) in the themes setup section; adjusted example bash command accordingly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I hopped through docs with a tiny cheer,
Corepack whispered, "Enable me here!"
No extra yarn tangled on the tree,
Clean installs now hum so merrily,
A rabbit's nod to simplicity 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: updating README docs to replace global Yarn installation with Corepack enablement in theme setup instructions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
README.md (1)

21-21: Consider adding context about when sudo is needed.

The corepack enable command is correct. However, the official Node.js documentation does not explicitly mention sudo as required—its necessity depends on how Node.js was installed and file permissions on the binary directory. For clarity, consider adding a note explaining that sudo may be needed for system-wide Node.js installations (such as via NodeSource) but might not be necessary for user-level installations.

📝 Optional: Add context about sudo requirement
-sudo corepack enable
+sudo corepack enable  # May require sudo if Node.js is installed system-wide; not needed for user-level installations
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 21, Add a short clarification next to the "corepack
enable" instruction explaining that using sudo may be necessary only for
system-wide Node.js installations (e.g., installed via NodeSource or when the
global binary directory is owned by root) but is not required for user-level
installs; update the README line with "corepack enable" to include a
parenthetical or one-sentence note indicating this and suggesting to try without
sudo first and use sudo only if permission errors occur.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@README.md`:
- Line 21: Add a short clarification next to the "corepack enable" instruction
explaining that using sudo may be necessary only for system-wide Node.js
installations (e.g., installed via NodeSource or when the global binary
directory is owned by root) but is not required for user-level installs; update
the README line with "corepack enable" to include a parenthetical or
one-sentence note indicating this and suggesting to try without sudo first and
use sudo only if permission errors occur.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: abac13d5-3bc1-408b-af52-4d6fe67a1f9b

📥 Commits

Reviewing files that changed from the base of the PR and between 1eb679c and ef5c4a4.

📒 Files selected for processing (1)
  • README.md
📜 Review details
🔇 Additional comments (1)
README.md (1)

15-15: The documentation statement that Corepack ships with Node.js 22+ is accurate and confirmed by nodejs.org documentation across multiple Node.js 22 versions (22.0.0, 22.1.0, 22.2.0, 22.6.0, 22.11.0). No changes needed.

Comment thread README.md Outdated
Comment thread README.md
Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
@Boy132 Boy132 merged commit 13bd696 into pelican-dev:main Apr 30, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants